import { ModuleMetadata, Type } from '@nestjs/common'
import { ClientBuilder } from 'discordoo'

export interface DiscordooModuleOptions {
  discordToken: string
  build: (builder: ClientBuilder) => ClientBuilder
}

export interface DiscordooModuleOptionsFactory {
  createDiscordooOptions(): DiscordooModuleOptions | Promise<DiscordooModuleOptions>
}

export interface DiscordooModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
  useExisting?: Type<DiscordooModuleOptionsFactory>
  useClass?: Type<DiscordooModuleOptionsFactory>
  inject?: any[]
  useFactory?: (...args: any[]) => Promise<DiscordooModuleOptions> | DiscordooModuleOptions
}
